<div id="wrapper">

    <form action="" class="login_form" method="" target="ifr_login">
        <input type="hidden" name="controller" value="SYSController"/>
        <input type="hidden" name="action" value="login-form"/>
		<fieldset>
			<div class="title_wrapper">
				<h1>Please Log in</h1>
				<a href="#">Forgot Password?</a>
			</div>
			<div class="inputs">
				<div class="inputs_inner">
					<label>
						<strong>Username:</strong>
						<span class="input"><input name="txtu" id="txtu" type="text" /></span>
					</label>
					<label>
						<strong>Password:</strong>
						<span class="input"><input name="txtp" id="txtp" type="text" /></span>
					</label>
                                    <span class="button first_btn"><span><span>Log in</span></span><input name="btnlogin1" id="btnlogin1" type="button" /></span>
				</div>
				
			</div>
			<div class="reminder">
				<input name="" type="checkbox" value="" /> Remember me on this computer
			</div>
			
			<ul class="system_messages" style="display:none;">
				<li id="errmsg" class="red"></li>
			</ul>
			
			
		</fieldset>
	</form>
        <iframe id="ifr_login" name="ifr_login" style="width:	0px;height:	0px;"></iframe>
	<script>
		$("#btnlogin").click(
			function(){
				var surl="../Controller/Navigation.php";
				var sdata={
					"controller":"SYSController",
					"action":"login",
					"u": Trim($("#txtu").val()),
					"p": Trim($("#txtp").val())
					
				};
				jQuery.ajax({
					type:"POST", 
					data:sdata, 
					dataType:"text", 
					url:surl, 
					success: function (data){ 
						$("#errmsg").html(data);
						$(".system_messages").show();
					},
					error: function (xhr, ajaxOptions, thrownError){
						$("#errmsg").html("<li><b>Status</b>:"+xhr.status+"<br/><b>ThrownError</b>:"+thrownError+"</li>");
						$(".system_messages").show();
					}
				});		
			}
		);
	</script>
</div>

